import React, { memo } from "react";
import './css.scss'
import TitleMore from '../TitleMore'
import { IMGURL } from '../../services/config'
export default memo(function RechTitle(props) {
    const { title, content, videoUrl = '', isImgOrVideo, isMore = false, moreUrl = '' } = props
    return (
        <div className='title_rech'>
            <TitleMore isMore={isMore} moreUrl={moreUrl} title={title}></TitleMore>
            <div className='rech_content'>
                <div style={{ display: videoUrl ? 'block' : 'none' }}>
                    {isImgOrVideo === 1 && videoUrl ? <img style={{ marginRight: '20px' }} alt='大赛详情' src={IMGURL + videoUrl} /> : <video className='video' src={IMGURL + videoUrl} controls></video>}
                </div>
                <div className='rech_text' dangerouslySetInnerHTML={{ __html: content }}>
                </div>
            </div>

        </div >
    )
})
